package com.mybatis_stu.mapper;

import com.mybatis_stu.pojo.ClassResponse;
import com.mybatis_stu.pojo.Clazz;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ClazzMapper {
    void insert(Clazz clazz);

    void deleteByIds(List<Integer> ids);

    List<Clazz> list();

    /**
     *根据职位Id查询班主任列表
     * */
    List<ClassResponse> getTeachersByPositionId(@Param("positionId") Integer positionId);
    /**
     *带条件的分页查询
     * */
    public List<Clazz> list(@Param("name") String name,@Param("begin") LocalDate begin,@Param("end") LocalDate end);


    /**
     * 修改班级
     *
     * @return
     */
    void updateInfo(Clazz clazz);
//    @Select("select id, class_name, room_name, start_time, end_time, head_teacher, create_time, update_time from db01.class where id =  #{id}")
//    Clazz findById(@Param("id") Integer id);
}
